<template>
  <div class="panel admin-panel">
    <div class="panel-head">
      <strong class="icon-reorder">职位类别列表</strong>
    </div>
    <!-- <div class="padding border-bottom">
      <router-link to="/category_add">
        <span class="icon-plus-square-o"></span>增加类别
      </router-link>
    </div>-->
    <table class="table table-hover text-center">
      <tr>
        <th>序号</th>
        <th>类别名称</th>
        <th>状态</th>
        <th>操作</th>
      </tr>

      <category-item
        v-for="(category,index) in categories"
        :key="category.id"
        :category="category"
        :index="index"
        @del="del(index)"
      ></category-item>
    </table>
  </div>
</template>

<script>
import CategoryItem from "./CategoryItem";

export default {
  name: "CategoryList",
  props: {
    categories: Array,
    del: Function
  },
  components: {
    CategoryItem
  }
};
</script>

<style scoped>
</style>
